<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>有奖答题平台</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <link rel="stylesheet" href="/lib/mobile/css/common.css?0000"/>
    <link rel="stylesheet" href="/lib/mobile/css/review.css"/>
</head>
<body>
<div class="main">
    <div class="main_title">
        <div class="title_left">答题积分</div>
        <div class="title_right"><span class="score">每答对一题积分值</span></div>
    </div>
    <ul class="review_list" id="review_list">
    </ul>

    <ul class="bottom_menu">
        <li  id="indexsy"><a href="javascript:void(0);">首页</a></li>
        <!--<li>|</li>-->
        <li  id="hdrule"><a href="javascript:void(0);">活动规则</a></li>
        <!--<li  id="point_rule"><a href="javascript:void(0);">积分规则</a></li>-->
        <!--<li>|</li>-->
        <!--<li id="prize_rule"><a href="javascript:void(0);">抽奖规则</a></li>-->
        <!--<li>|</li>-->
        <li id="center"><a href="javascript:void(0);">个人中心</a></li>
    </ul>
</div>
    <!-- 依赖库 手机调试的js引用顺序如下 -->
    <script src="/lib/mobile/js/zepto.js"></script>
    <script src="/lib/mobile/js/plugins/fastclick.js"></script>
    <script src="/lib/mobile/js/bui.js"></script>
    <script src="/lib/mobile/js/common.js?0000    "></script>
    <script>
        bui.ready(function () {
            // 这里写业务及控件初始化
            var storage = bui.storage();
            bui.btn({id: ".bui-page", handle: ".bui-btn"}).load();
            var pageview = {};
            pageview.init = function () {
                // 验证码示例
                $("#indexsy").on("click", function (argument) {
                    bui.load({ url: BASE_URL+"mobile/index"});
                });
                $("#point_rule").on("click", function (argument) {
                    bui.load({ url: BASE_URL+"mobile/point_rule"});
                });
                $("#prize_rule").on("click", function (argument) {
                    bui.load({ url: BASE_URL+"mobile/prize_rule"});
                });
                $("#center").on("click", function (argument) {
                    bui.load({ url: BASE_URL+"mobile/center"});
                });
                var uid=storage.get("uid");
                //我的积分
                getPointRuleList();
            }
            pageview.init();
        })
        function getPointRuleList() {
            //执行登录操作
            var loginAjax = bui.ajax({
                url: BASE_URL+"mobile/getPointRuleList",
                // 可选参数
                data: {},
                method: "POST"
            });
            loginAjax.then(function(res) {
                if(res.code == 0){
                    var user = res.data.list;
                    var html='';
                    for(var i=0;i<user.length;i++){

                        html +="<li>\n" +
                            "                                <dl>\n" +
                            "                                       <dt>\n" +
                            "                                            <p class=\"other\">当日答题次数（第"+user[i].answercn+"次）</p>\n" +
                            // "                                           <p class=\"other\">当日答题次数（第"+user[i].answercn+"次）</p>\n" +
                            "                                       </dt>\n" +
                            "                                         <dd><strong>"+user[i].point+"/题</strong></dd>\n" +
                            "                                  </dl>\n" +
                            "                               </li>";

                    }
                    $("#review_list").html(html);
                }else{
                    bui.alert(res.msg);
                }
            },function(res) {
                bui.alert("请求异常");
            })
        }
    </script>
</body>
</html>